﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using com.dtn.deals;
using System.Data;
public partial class Controls_HeaderLogin : System.Web.UI.UserControl
{
    public string sUsername = "";
    protected void Page_Load(object sender, EventArgs e)
    {
      /*  Itbl_CityManager objCity = tbl_CityManager.CreateInstance();
        tbl_City tblCity= objCity.Selecttbl_CityByID(1); */
        if (Session["UserId"] != null && Session["UserName"] != null)
        {
            sUsername = Session["UserName"].ToString();
            pnlNotLogin.Visible = true;
            pnlLogin.Visible = false;
        }
        else
        {
            pnlNotLogin.Visible = false;
            pnlLogin.Visible = true;
        
        }

    }
    protected void lbtnLogout_Click(object sender, EventArgs e)
    {
        Session["UserName"] = null;
       // Session["Name"] = null;
        Session["UserId"] = null;
        Response.Redirect("~/Default.aspx");
    }
}